﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace X23.ApplicationJob
{
    /// <summary>
    /// 定时任务
    /// </summary>
    [AttributeUsage(AttributeTargets.Method)]
    public class JobAttribute : Attribute
    {
        /// <summary>
        /// 定时任务
        /// </summary>
        /// <param name="key">关键字</param>
        /// <param name="methtod">方法名称</param>
        /// <param name="cron">Cron表达式</param>
        /// <param name="jobName">任务名称</param>
        /// <param name="cronName">Cron表达式名称</param>
        public JobAttribute(string key, string methtod, string cron, string jobName, string cronName)
        {
            Key = key;
            Methtod = methtod;
            Cron = cron;
            JobName = jobName;
            CronName = cronName;
        }
        /// <summary>
        /// 关键字
        /// </summary>
        public string Key { get; set; }
        /// <summary>
        /// 方法名称
        /// </summary>
        public string Methtod { get; set; }
        /// <summary>
        /// Cron表达式
        /// </summary>
        public string Cron { get; set; }
        /// <summary>
        /// 任务名称
        /// </summary>
        public string JobName { get; set; }
        /// <summary>
        /// Cron表达式名称
        /// </summary>
        public string CronName { get; set; }
    }
}
